#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#

# import sys

# print(sys.getrecursionlimit())
# sys.setrecursionlimit(50)


# def detui(n):
#     if n == 1:
#         return 10
#     n -= 1
#     return detui(n) + 2
#
#
# print(detui(5))


l = [1, [2, [3, [4, [5, [6, [7, [8]]]]]]]]


def dl(l):
    for its in l:
        if type(its) is list:
            dl(its)
        else:
            print(its)


dl(l)
